<html lang="zh" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org"
      layout:decorate="~{template/container}">
<!--/*@thymesVar id="roleList" type="java.util.List<site.zsxeee.work.spring.oa.database.entity.Role>"*/-->
<main class="main-content col-lg-10 col-md-9 col-sm-12 p-0 offset-lg-2 offset-md-3" layout:fragment="content">
    <div th:replace="template/navbar"></div>
    <div class="main-content-container container-fluid px-4 mb-4">
        <!-- Page Header -->
        <div class="page-header row no-gutters py-4">
            <div class="col-12 col-sm-4 text-center text-sm-left mb-4 mb-sm-0">
                <span class="text-uppercase page-subtitle">控制面板</span>
                <h3 class="page-title">角色管理</h3>
            </div>
            <div class="offset-sm-4 col-4 d-flex col-12 col-sm-4 d-flex align-items-center" style="margin-left: auto">
                <button class="btn btn-accent" style="margin-left: auto"><i class="fa fa-plus"></i> 新增角色</button>
            </div>
        </div>
        <!-- End Page Header -->
        <!-- Transaction History Table -->
        <table class="transaction-history d-none">
            <thead>
            <tr>
                <th>ID</th>
                <th>名称</th>
                <th>备注</th>
                <th>创建人</th>
                <th>创建时间</th>
                <th>修改人</th>
                <th>修改时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="role:${roleList}">
                <td th:text="${role.id}"></td>
                <td th:text="${role.name}"></td>
                <td th:text="${role.comment}"></td>
                <td th:text="${role.creatorUser}"></td>
                <td th:text="${#dates.format(role.createDate, 'yyyy-MM-dd hh:mm:ss')}"></td>
                <td th:text="${role.modifierUser}"></td>
                <td th:text="${#dates.format(role.modifyDate, 'yyyy-MM-dd hh:mm:ss')}"></td>
                <td>
                    <div class="btn-group btn-group-sm" role="group" aria-label="Table row actions">
                        <button type="button" class="btn btn-white">
                            <i class="material-icons">&#xE254;</i>
                        </button>
                        <button type="button" class="btn btn-danger" th:onclick="'delUser('+${role.id}+')'">
                            <i class="material-icons">&#xE872;</i>
                        </button>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
        <!-- End Transaction History Table -->
    </div>
</main>
</html>